<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<div class="container">
    <h2>Event's list</h2>
    <table class="table table-striped table-bordered">
        <thead>
        <tr>
            <th  style="min-width:10px; max-width:900px;width:auto; white-space:nowrap;">Event</th>
            <th style="width:104px;">From</th>
            <th style="width:104px;">To</th>
            <th style="width:14px;"><a href="#" title="Add new event"><i class="icon-plus"></i></a></th>
            <th style="width:14px;"><a href="#" title="Start video session"><i class="icon-video"></i></a></th>
        </tr>
        </thead>
        <tbody>
        <c:if test="${not empty events }">
        	<c:forEach var="event" items="events">
        		<tr>
            <td><a href="@routes.Calendar.edit(event.id)">${event.title }</a></td>
            	<%-- <c:choose>
            	<c:when test="${event.allDay && event.endsSameDay }">
            		<td colspan="2">
            		<c:choose>
            			<c:when test="${event.star == null }">
            			-
            			</c:when>
            			<c:otherwise>
						(All day)            			
            			</c:otherwise>
            		</c:choose>
            		</td>
            	</c:when>
            	<c:otherwise>
            		<td>
            		<c:choose>
            			<c:when test="${event.start == null }"> - </c:when>
            			<c:otherwise>
            				${event.start }
            			</c:otherwise>
            		</c:choose>
            		</td>
            		<td>
            		<c:choose>
            			<c:when test="${event.end == null }"> - </c:when>
            			<c:otherwise>
            				${event.end }
            			</c:otherwise>
            		</c:choose>
            		</td>
            	</c:otherwise>
            	</c:choose>
 --%>            	 <td><a href="@routes.Calendar.delete(event.id)"><i class="icon-trash"></i></a> </td>
            	 <td><a href="@routes.Application.checkToTeachOrLearn(event.id)"><i class="icon-video"></i></a> </td>
            	 </tr>
        	</c:forEach>
        </c:if>
        </tbody>
    </table>
</div>

